package com.chmingx.boot.mapper;

import com.chmingx.boot.bean.City;
import org.apache.ibatis.annotations.*;

@Mapper
public interface CityMapper {
    @Select("select * from city where id=#{id}")
    public City getCityById(@Param("id") Long id);

    @Insert("insert into city(`name`, `state`, `country`) values (#{name}, #{state}, #{country})")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    public void insert(City city);
}
